﻿using Padsurface.App.Services.Interfaces;
using System.Collections.Generic;
using Windows.Foundation;
using Windows.Storage;

namespace Padsurface.App.Tests.Unit.Stubs
{
    public class FilePickerStub : IFilePicker
    {
        public StorageFile PickSingleWaveFileAsyncResult { get; set; }
        public IReadOnlyList<StorageFile> PickMultipleFilesAsyncResult { get; set; }
        public StorageFile SaveWaveFileAsyncResult { get; set; }
        public StorageFile OpenSingleSongFileAsyncResult { get; set; }

        public IAsyncOperation<StorageFile> OpenSingleWaveFileAsync()
        {
            return new AsyncOperationStub<StorageFile>(PickSingleWaveFileAsyncResult);
        }

        public IAsyncOperation<IReadOnlyList<StorageFile>> OpenMultipleWaveFilesAsync()
        {
            return new AsyncOperationStub<IReadOnlyList<StorageFile>>(PickMultipleFilesAsyncResult);
        }

        public IAsyncOperation<StorageFile> SaveWaveFileAsync(string suggestedFileName = null)
        {
            return new AsyncOperationStub<StorageFile>(SaveWaveFileAsyncResult);
        }

        public IAsyncOperation<StorageFile> SaveSongFileAsync(string suggestedFileName = null)
        {
            throw new System.NotImplementedException();
        }

        public IAsyncOperation<StorageFile> OpenSingleSongFileAsync()
        {
            return new AsyncOperationStub<StorageFile>(OpenSingleSongFileAsyncResult);
        }
    }
}
